<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增返现黑名单')" />
    <th:block th:include="include :: datetimepicker-css" />
    </head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-returnBlack-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">黑名单类型：</label>
                <div class="col-sm-8">
                    <select name="blackType" class="form-control m-b">
                        <option value="1">身份证已注册</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">原商户编号：</label>
                <div class="col-sm-8">
                    <input name="merno" id="merNo" onclick="selectMerInfo()" class="form-control" type="text" readonly required>
                    <i class="fa fa-search" style="margin-top: -22px;margin-right:3px;float:right;"></i>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">原商户名称：</label>
                <div class="col-sm-8">
                    <input name="merName" id="merName" class="form-control" type="text" readonly required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">身份证号：</label>
                <div class="col-sm-8">
                    <input name="idNumber" class="form-control" id="legalCerno" type="text" readonly required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">添加原因：</label>
                <div class="col-sm-8">
                    <textarea name="addNote" class="form-control" type="text" maxlength="60" required >前电签商户已经注销，返现奖励已经发放。</textarea>
                </div>
            </div>
                <p style="color: red; margin: 150px 405px 0px 405px">用于添加已注销并已返现完成的商户</p>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "returnBlack/returnBlack"
        $("#form-returnBlack-add").validate({
            focusCleanup: true
        });

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-returnBlack-add').serialize());
            }
        }

        function selectMerInfo(){
            var url =prefix+ "/selectMerInfo";
            $.modal.open("选择商户" , url, '1000',"500");
        }
    </script>
</body>
</html>